from PyQt5.QtWidgets import QMessageBox
def warning(title: str,text: str,buttons = QMessageBox.ok):
    msgbox = QMessageBox()
    msgbox.setIcon(QMessageBox.Warning)
    msgbox.setWindowTitle(title)
    msgbox.setText(text)
    msgbox.setStandardButtons(buttons)
